<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>yefan's Tomato</title>
    <script src="jquery-3.2.1.min.js"></script>
</head>
<body>
    <div>
        <input type="text" name="time">请开始你的表演
        <button onclick="go();">start</button>
        <div id="timeShow">
            <span></span> :
            <span></span>
        </div>
    </div>
</body>
<script>
    function go(){
        var time = $('input[name="time"]').val();
        $('#timeShow span:first-child').text(--time);
        var second = 59;
        $('#timeShow span:last-child').text(second);
        var secondVal = setInterval(function(){
            $('#timeShow span:last-child').text(--second)
            if(second == 0){
                second = 59;
                $('#timeShow span:first-child').text(--time);
            }
            if(second == 0 && time==0){
                clearInterval(secondVal);
            }
        },1000)
    }

</script>
</html>